import request from '@/router/axios';
import config from '@/config/website'

//列表
export const settlementList = (current, size, equipment) => {
    return request({
        url: '/api/blade-sale/productstatement/page',
        method: 'get',
        params: {
            current,
            size,
            ...equipment
        }
    })
}


//新建
export const settlementAdd = (data) => {
    return request({
        url: '/api/blade-sale/productstatement/save',
        method: 'post',
        data
    })
}
//修改
export const settlementUpdate = (data) => {
    return request({
        url: '/api/blade-sale/productstatement/update',
        method: 'post',
        data
    })
}
//查看
export const settlementView = (id) => {
    return request({
        url: '/api/blade-sale/productstatement/detail',
        method: 'get',
        params: {
            id
        }
    })
}

//删除
export const settlementDel = (ids) => {
    return request({
        url: '/api/blade-sale/productstatement/remove',
        method: 'post',
        params: {
            ids
        }
    })
}
//提交
export const settlementSubmit = (id) => {
    return request({
        url: '/api/blade-sale/productstatement/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}
//获取对账单
export const getSettlementList = (customerId,startTime,endTime) => {
    return request({
        url: '/api/blade-sale/productstatement/list',
        method: 'get',
        params: {
            customerId,
            startTime,
            endTime
        }
    })
}


//查看
export const customerProfileView = (id) => {
  return request({
    url: '/api/hg-public/customer/detail',
    method: 'get',
    params: {
      id
    }
  })
}

